package com.yc.study.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yc.study.entity.Announcement;
import com.yc.study.mapper.AnnouncementMapper;
import com.yc.study.service.IAnnouncementService;
import com.yc.study.vo.AnnouncementVo;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * 服务实现类
 *
 * @author 王妍
 * @since 2022-02-20
 */
@Service
@AllArgsConstructor
public class AnnouncementServiceImpl extends ServiceImpl<AnnouncementMapper, Announcement>
    implements IAnnouncementService {
  private final AnnouncementMapper announcementMapper;

  @Override
  public Page<AnnouncementVo> loadPage(
      Page<AnnouncementVo> announcementPage, AnnouncementVo announcement) {
    return announcementMapper.loadPageVo(announcementPage, announcement);
  }
}
